1. Field of the Invention
The present invention relates to optical disc recording devices such as CD-R, CD-RW, DVD-RAM, DVD-RW, and DVD+RW drives used with personal computers. More specifically, the invention relates to a method and apparatus for avoiding buffer under-run conditions during recording of an optical disc.
2. Description of the Related Art
A CD-RW (Compact Disc ReWriteable) drive is a type of peripheral storage device that is capable of recording and reading data to/from optical discs in a CD-R format and a CD-RW format. The CD-RW drive typically communicates with a host computer, such as a PC, over a peripheral device bus, such as a USB (Universal Serial Bus) or an ATAPI (AT Attachment Packet Interface). In current implementations, the CD-RW drive is capable of recording and reading at standard CLV (constant linear velocity) rotational speeds, designated as 1×, 2×, 4× and 8× (and also referred to as single speed, double speed, quad speed, etc.). The linear velocity of the disc varies with the rotational velocity of the disc and the radius from the center of the disc at which an optical pick-up is accessing the disc.
During the recording process, the host computer sends a stream of data across the peripheral device bus to the CD-RW drive. The CD-RW drive temporarily stores the data in a FIFO (first-in-first-out) buffer, and then writes the data to a continuous spiral track of the disc. The rate at which the data is read from the buffer and written to the disc is proportional to the linear velocity of the optical disc.
In current implementations, once selected, the linear velocity of the optical disc cannot be changed during the write process. Higher linear velocities are preferred because the time it takes for a CD-RW drive to write to an optical disc is inversely proportional to the linear velocity of the optical disc.
However, the rate at which data is transferred from the host to the CD-RW drive can fluctuate during the recording process. Such fluctuations can occur, for example, when other peripheral devices such as printers occupy bandwidth on the peripheral device bus. As the result of these fluctuations, it is possible for the drive's buffer to become empty (referred to as a “buffer under-run” condition), resulting in an interruption to the data stream provided to the optical disc.
The result of an interruption to the data stream of the optical disc is an unrecoverable error. Where the optical disc is a CD-R disc, the disc becomes permanently unusable, wasting both time and the disc. Where the optical disc is a CD-RW disc, the disc can be re-written from scratch, but at the cost of frustration and additional time. Re-writing a CD-RW disc is particularly inconvenient when the CD-RW contained data from prior writes.
Table 1, below, provides a summary of selected speeds of an optical drive writing to a CD-R or CD-RW.
TABLE 1SpeedData Transfer RateTime to Write 650 MB1X (single speed)150 kB/sec72 minutes2X300 kB/sec36 minutes4X600 kB/sec18 minutes8X1.2 MB/sec 9 minutes
To avoid a “buffer under-run” condition, a partial solution is to dramatically increase the size of the buffer. A typical buffer is about 2 to 4 MB in size. The practical considerations of size and cost make it difficult for a buffer to approach the size of the capacity of a full 650-MB Compact Disc. Therefore, a large buffer generally offers protection only against a short-term fluctuation in the data rate. Should the peripheral device bus speed fall below the data rate required by the selected linear velocity for a sustained period of time, the large buffer would eventually under-run, resulting in the unrecoverable error.
Another partial solution has been to allow selection of a slower linear velocity than the maximum permissible by the drive. Although selecting a slow write speed allows the drive to record on a CD-R or CD-RW at a lower data transfer rate, once selected, the drive write to the entire disc at the slow speed. Writing to a CD-R or CD-RW at a speed slower than the system allows is disadvantageous because the slow speed wastes time. As indicated by Table 1, writing to an entire CD-R or CD-RW at single speed (1×) can take longer than one hour.
The dramatically increased data storage capability of more recent optical discs, such as DVD-RAM, DVD-RW, and DVD+RW, further exacerbates the dilemma of choosing between a slow write speed for reliability versus a fast write speed for speed. For a given peripheral device bus speed, the increased data storage capability of DVD increases the duration of time it takes to record a full DVD. The increased duration of time results in greater exposure to potential fluctuations in the data rate of the peripheral device bus. However, the greater storage capacity also encourages the use of higher bandwidth data rates to reduce the writing time, thereby increasing the susceptibility to fluctuations in the peripheral device bus.